<?php

namespace app\index\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * 安检记录表
 * Class SecurityCheckRecord
 * @package app\index\model
 */
class SecurityCheckRecord extends Model
{
    use SoftDelete;

    public $autoWriteTimestamp = 'int';
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = 'deletetime';
    protected $append = [
        'status_text'
    ];

    public function getStatusTextAttr($value,$data)
    {
        $arrAction = ['', '安检中', '已完成','已取消'];
        if (empty($data['status']) || empty($arrAction[$data['status']])) return '';
        return $arrAction[$data['status']];
    }

}